package com.mlnx.work.enums;

import com.mlnx.common.entity.BaseExceptionMsg;

/**
 * Created by amanda.shan on 2019/7/1.
 */
public enum ResponseEnum implements BaseExceptionMsg {
    SUCESS("0000", "成功"),

    LOGIN_FAIL("1000", "登录失败"),
    PARAM_ERROR("1001", "参数错误"),

    USER_FAIL("2000", "用户失败"),
    GET_SMS_CODE_FAIL("2001", "获取短信验证码错误"),
    PHONE_CODE_ERROR("2002", "短信验证码错误"),
    EMAIL_INVAIL("2003", "邮箱无效"),


    ROLE_FAIL("3000", "角色名字重复"),


    //项目相关异常
    MYSQL_OPERATION_EXCEPTION("4000", "数据库异常"),
    NONE_PROJECT_AUTHORITY("4001", "权限不足"),
    INVALID_OVERDUE("4003", "未逾期无法添加逾期计划"),
    CHILD_NOT_COMPLETED("4005", "子项尚未完成"),
    START_TIME_SET_ALREADY("4007", "已设置实际开始时间"),
    WORK_HOUR_SET_ALREADY("4009", "已设置工时"),
    OVERDUE_TIME_OVER("4010","逾期说明的时间不能超过逾期时间");


    private String code;

    private String describe;

    ResponseEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return describe;
    }

    public ResponseEnum setCode(String code) {
        this.code = code;
        return this;
    }

    public String getDescribe() {
        return describe;
    }

    public ResponseEnum setDescribe(String describe) {
        this.describe = describe;
        return this;
    }
}
